/*
 * @Description:疾病处理
 */
import request from '@/utils/request'
export default {
    //添加
    add(data) {
        return request.post(`/fish/health/diseaseDeal/add`, { ...data })
    },
    //编辑
    edit(data) {
        return request.post(`/fish/health/diseaseDeal/edit`, { ...data })
    },
    //批量删除
    delList(list) {
        return request.get(`/fish/health/diseaseDeal/delListById?idList=${list}`)
    },
    // 主键查询
    queryById(id) {
        return request.get(`/fish/health/diseaseDeal/queryById?id=${id}`)
    },
    //条件查询
    queryByCondition(data) {
        return request.post(`/fish/health/diseaseDeal/queryByCondition`, { ...data })
    },
    //分页查询
    queryPageByCondition(data) {
        data.entity = !data.entity ? {} : data.entity
        return request.post(`/fish/health/diseaseDeal/queryPageByCondition`, { ...data })
    },
    //用药详情
    diseaseDealDetailList(data) {
        console.log(data)
        return request.post(`/fish/health/diseaseDealDetail/queryByCondition`, { ...data })

    },
    // 查询休药期
    queryDrug(data) {
        let batchId = data.batchId;
        let materialNo = data.materialNo;
        return request.get(`/fish/health/diseaseDeal/queryDrug?batchId=${batchId}&materialNo=${materialNo}`)
    },
    // 查询设施用药分析信息
    queryByFacility(data) {
        return request.post(`/fish/health/diseaseDeal/queryByFacility`, data)
    },
    // 有处方情况下查询
    queryByPrescriptionIdAndDiseaseRecordId(diseaseRecordId, prescriptionId) {
        return request.get(`/fish/health/diseaseDeal/queryByPrescriptionIdAndDiseaseRecordId?diseaseRecordId=${diseaseRecordId}&prescriptionId=${prescriptionId}`)
    },
    // 无处方情况下查询
    queryAllDetailByDiseaseRecordId(diseaseRecordId) {
        return request.get(`/fish/health/diseaseDeal/queryAllDetailByDiseaseRecordId?diseaseRecordId=${diseaseRecordId}`)
    },
};
